package 责任链模式.impl;

import 责任链模式.AbstractHandler;

/**
 *
 */
public class HandlerOneImpl extends AbstractHandler {

    @Override
    public void execute(int level) {
        if (this.level >= level) {
            System.out.println("HandlerOneImpl处理，当前请求level: " + level);
        } else {
            if (this.nextHandler != null) {
                this.nextHandler.execute(level);
            } else {
                System.out.println("无法处理，当前请求level: " + level);
            }
        }
    }
}
